package com.jiazhong.ssm.test06参数验证.pojo;

import jakarta.validation.constraints.*;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * @Auther:shuXin
 */
@Data
public class User {
    //name的值不为空
    @NotBlank
    private String name;
    //password的值的长度大于6
    @Length(min = 6)
    private String password;
    //age的值必须大于等于1
    @Min(1)
    private Integer age;
    //email
    @Email
    private String email;
    //过去的时间
    @Past
    private Date birthday;
}
